Resource leak recovery in a multi-node computer system

ABSTRACT

A process is disclosed for identifying and recovering from resource leaks on compute nodes of a parallel computing system. A resource monitor stores information about system resources available on a compute node in a clean state. After the compute node runs a job, the resource monitor compares the current resource availability to the clean state. If a resource leak is found, the resource monitor contacts a global resource manger to remove the resource leak.

BACKGROUND OF THE INVENTION

1. Field of the Invention

Embodiments of the invention generally relate to improving systemutilization on a massively parallel computer system. More specifically,embodiments of the invention are related to recovering from a resourceleak on a compute node (or nodes) of a multi-node computer system.

2. Description of the Related Art

Powerful computers may be designed as highly parallel systems where theprocessing activity of hundreds, if not thousands, of processors (CPUs)are coordinated to perform computing tasks. These systems are highlyuseful for a broad variety of applications, including financialmodeling, hydrodynamics, quantum chemistry, astronomy, weather modelingand prediction, geological modeling, prime number factoring, and imageprocessing (e.g., CGI animations and rendering), to name but a fewexamples.

For example, one family of parallel computing systems has been (andcontinues to be) developed by International Business Machines (IBM)under the name Blue Gene®. The Blue Gene/L architecture provides ascalable, parallel computer that may be configured with a maximum of65,536 (2 ¹⁶) compute nodes. Each compute node includes a singleapplication specific integrated circuit (ASIC) with 2 CPU's and memory.The Blue Gene/L architecture has been successful and on Oct. 27, 2005,IBM announced that a Blue Gene/L system had reached an operational speedof 280.6 teraflops (280.6 trillion floating-point operations persecond), making it the fastest computer in the world at that time.Further, as of June 2005, Blue Gene/L installations at various sitesworld-wide were among five out of the ten top most powerful computers inthe world.

Each compute node in a massively parallel computing system may beconfigured to run multiple computing jobs. The jobs can be part of asingle computing task or independent from one another. In some cases, ajob may leave behind unwanted remnants, for example, a job may leavebehind orphaned processes or temporary files stored in memory. Thepresence of such artifacts on a given node reduces the resourcesavailable to future computing jobs scheduled to execute on that node.Although the impact on a single node may be small, when a computing jobexecuted on thousands of nodes creates a resource leak, the performanceof the entire computing system may be substantially reduced.

SUMMARY OF THE INVENTION

One embodiment of the invention includes a method for correctingresource leaks that occur on a parallel computing system having aplurality of compute nodes. The method may generally include determininga first resource availability level of a first compute node, of theplurality of compute nodes, in a clean state characterized by an absenceresource leaks on the first compute node. The method may also includeexecuting one or more computing tasks on the first compute node,determining a second resource availability level of the first computenode, and comparing the first resource availability level to the secondresource availability level to determine whether a resource leak hasoccurred on the first compute node. Upon determining that a resourceleak has occurred, the first compute node may be removed from a pool ofcompute nodes available to perform computing tasks and a correctiveaction invoked to restore the resource availability level of the firstcompute node to the clean state. After the clean state is restored onthe first compute node, the first compute node is returned to the poolof available compute nodes.

Still another embodiment of the invention includes a computer-readablestorage medium containing a program which, when executed, performs anoperation for correcting resource leaks that occur on a parallelcomputing system having a plurality of compute nodes. The operation maygenerally include determining a first resource availability level of afirst compute node, of the plurality of compute nodes, in a clean statecharacterized by an absence resource leaks on the first compute node.The operation may further include executing one or more computing taskson the first compute node, determining a second resource availabilitylevel of the first compute node, and comparing the first resourceavailability level to the second resource availability level todetermine whether a resource leak has occurred on the first computenode. Upon determining that a resource leak has occurred, the firstcompute node may be removed from a pool of compute nodes available toperform computing tasks and a corrective action invoked to restore theresource availability level of the first compute node to the cleanstate. After the clean state is restored on the first compute node, thefirst compute node is returned to the pool of available compute nodes.

Still another embodiment of the invention includes a parallel computingsystem. The system may generally include a plurality of compute nodes,each having at least a processor and a memory and a program executed onat least a first compute node, of the plurality. The program may begenerally configured to determine a first resource availability level ofthe first compute node in a clean state characterized by an absenceresource leaks on the first compute node. The program may be furtherconfigured to determine, after at least a first computing task has beenperformed on the first compute node, a second resource availabilitylevel of the first compute node and to compare the first resourceavailability level to the second resource availability level todetermine whether a resource leak has occurred on the first computenode. Upon determining that a resource leak has occurred, the firstcompute node may be removed from a pool of compute nodes available toperform computing tasks and a corrective action invoked to restore theresource availability level of the first compute node to the cleanstate. After the clean state is restored on the first compute node, thefirst compute node is returned to the pool of available compute nodes.

BRIEF DESCRIPTION OF THE DRAWINGS

So that the manner in which the above recited features, advantages andobjects of the present invention are attained and can be understood indetail, a more particular description of the invention, brieflysummarized above, may be had by reference to the embodiments thereofwhich are illustrated in the appended drawings.

It is to be noted, however, that the appended drawings illustrate onlytypical embodiments of this invention and are therefore not to beconsidered limiting of its scope, for the invention may admit to otherequally effective embodiments.

FIG. 1 is a block diagram illustrating components of a massivelyparallel computer system, according to one embodiment of the presentinvention.

FIG. 2 is an illustration of a three dimensional torus network of thesystem of FIG. 1, according to one embodiment of the invention.

FIG. 3 is a high-level diagram of a compute node of the system of FIG.1, according to one embodiment of the invention.

FIG. 4 illustrates an example of a node recovering from a resource leak,according to one embodiment of the invention.

FIG. 5 is a flow diagram illustrating a method for recovering from aresource leak on a compute node of a multi-node computer system,according to one embodiment of the invention.

FIG. 6 is a flow diagram illustrating a method for recovering from aresource leak on a compute node (or nodes) of a multi-node computersystem, according to one embodiment of the invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Embodiments of the invention provide techniques that enhance noderesource management on a parallel computing system by monitoring computenodes for resource leaks and restoring such nodes to a known “clean”state when a resource leak is identified. Doing so may allow a massivelyparallel computing system to identify and recover from resource leakswithout unduly impacting overall system performance.

In one embodiment, a compute node may evaluate the resources availableon that node to determine whether a resource leak has occurred. Forexample, the compute node may accomplish this through a backgroundprocess, also known as a “daemon,” or by using routines provided by thenode's operating system. The compute node uses a resource monitor toevaluate the available resources and determine whether a resource leakhas occurred. As part of an initial program load, the resource monitormay be configured to collect an initial set of data reflecting theresources available on that node in a “clean” state, e.g., the amount ofavailable memory, the available disk space, communication resources andthe like. After the compute node completes a job (or jobs), and performsany necessary clean-up (e.g., freeing allocated memory, deletingtemporary files, tearing down communication links or deleting buffersused to store network data, etc.), the resource monitor may compare datareflecting the resources then currently available with the initial setof data. If the resource monitor determines that a substantialpercentage of resources remain unavailable, then a resource leak mayexist. In such a case, the resource monitor may be configured to performa corrective action with respect to that node. For example, the resourcemonitor may notify a global resource manager on a service node. Theresource manager may remove the node from a pool of available nodes andinvoke a procedure to restore the node to a known “clean” state. Forexample, the resource manager may simply re-boot the compute node. In analternative case, however, the compute node may be returned to a cleanstate using a stored image of a node-state (e.g., a set of memory andregister settings). Once the node is restored to a clean state, theresource manager returns the node to the pool of available nodes.

In an alternative approach, the global resource manager may poll idlenodes (or randomly sample idle nodes) to determine whether a resourceleak may have occurred. The resource manager may poll a compute node toobtain resource availability data at boot-time (or other “clean” point)and subsequently obtain current resource availability data for thecompute node. Once a resource leak is identified by comparing theresource availably data, the resource manager may remove the node fromthe pool of available nodes and restore the node to a “clean” state, asdescribed above. This approach may be useful where many nodes run thesame application program, e.g., to process different data sets inparallel. In such a case, if a resource leak occurs on one compute nodeas a result of running a job, it may be likely to occur on other nodesas well. Accordingly, the resource manager may determine whether aresource leak has occurred on other compute nodes that have run the samecomputing job.

In the following, reference is made to embodiments of the invention.However, it should be understood that the invention is not limited tospecific described embodiments. Instead, any combination of thefollowing features and elements, whether related to differentembodiments or not, is contemplated to implement and practice theinvention. Furthermore, in various embodiments the invention providesnumerous advantages over the prior art. However, although embodiments ofthe invention may achieve advantages over other possible solutionsand/or over the prior art, whether or not a particular advantage isachieved by a given embodiment is not limiting of the invention. Thus,the following aspects, features, embodiments and advantages are merelyillustrative and are not considered elements or limitations of theappended claims except where explicitly recited in a claim(s). Likewise,reference to “the invention” shall not be construed as a generalizationof any inventive subject matter disclosed herein and shall not beconsidered to be an element or limitation of the appended claims exceptwhere explicitly recited in a claim(s).

One embodiment of the invention is implemented as a program product foruse with a computer system. The program(s) of the program productdefines functions of the embodiments (including the methods describedherein) and can be contained on a variety of computer-readable storagemedia. Illustrative computer-readable storage media include, but are notlimited to: (i) non-writable storage media (e.g., read-only memorydevices within a computer such as CD-ROM disks readable by a CD-ROMdrive) on which information is permanently stored; (ii) writable storagemedia (e.g., floppy disks within a diskette drive or hard-disk drive) onwhich alterable information is stored. Such computer-readable storagemedia, when carrying computer-readable instructions that direct thefunctions of the present invention, are embodiments of the presentinvention. Other media include communications media through whichinformation is conveyed to a computer, such as through a computer ortelephone network, including wireless communications networks. Thelatter embodiment specifically includes transmitting information to/fromthe Internet and other networks. Such communications media, whencarrying computer-readable instructions that direct the functions of thepresent invention, are embodiments of the present invention. Broadly,computer-readable storage media and communications media may be referredto herein as computer-readable media.

In general, the routines executed to implement the embodiments of theinvention, may be part of an operating system or a specific application,component, program, module, object, or sequence of instructions. Thecomputer program of the present invention typically is comprised of amultitude of instructions that will be translated by the native computerinto a machine-readable format and hence executable instructions. Also,programs are comprised of variables and data structures that eitherreside locally to the program or are found in memory or on storagedevices. In addition, various programs described hereinafter may beidentified based upon the application for which they are implemented ina specific embodiment of the invention. However, it should beappreciated that any particular program nomenclature that follows isused merely for convenience, and thus the invention should not belimited to use solely in any specific application identified and/orimplied by such nomenclature.

FIG. 1 is a high-level block diagram of components of a massivelyparallel computer system 100, according to one embodiment of the presentinvention. Illustratively, computer system 100 shows the high-levelarchitecture of an IBM Blue Gene® computer system, it being understoodthat other parallel computer systems could be used, and the descriptionof a preferred embodiment herein is not intended to limit the presentinvention.

As shown, computer system 100 includes a compute core 101 having aplurality of compute nodes 112 arranged in a regular array or matrix.Compute nodes 112 perform the useful work performed by system 100. Theoperation of computer system 100, including compute core 101, may becontrolled by service node 102. Various additional processors infront-end nodes 103 may perform auxiliary data processing functions, andfile servers 104 provide an interface to data storage devices such asdisk based storage 109A, 109B or other I/O (not shown). Functionalnetwork 105 provides the primary data communication path among computecore 101 and other system components. For example, data stored instorage devices attached to file servers 104 is loaded and stored toother system components through functional network 105.

Also as shown, compute core 101 includes I/O nodes 111A-C and computenodes 112A-I. Compute nodes 112 provide the processing capacity ofparallel system 100, and are configured to execute applications writtenfor parallel processing. I/O nodes 111 handle I/O operations on behalfof compute nodes 112. For example, the I/O node 111 may retrieve datafrom file servers 104 requested by one of compute nodes 112. Each I/Onode 111 may include a processor and interface hardware that handles I/Ooperations for a set of N compute nodes 112, the I/O node and itsrespective set of N compute nodes are referred to as a Pset. Computecore 101 contains M Psets 115A-C, each including a single I/O node 111and N compute nodes 112, for a total of M×N compute nodes 112. Theproduct M×N can be very large. For example, in one implementation M=1024(1K) and N=64, for a total of 64K compute nodes.

In general, application programming code and other data input requiredby compute core 101 to execute user applications, as well as data outputproduced by the compute core 101, is communicated over functionalnetwork 105. The compute nodes within a Pset 115 communicate with thecorresponding I/O node over a corresponding local I/O tree network113A-C. The I/O nodes, in turn, are connected to functional network 105,over which they communicate with I/O devices attached to file servers104, or with other system components. Thus, the local I/O tree networks113 may be viewed logically as extensions of functional network 105, andlike functional network 105, are used for data I/O, although they arephysically separated from functional network 105.

Service node 102 may be configured to direct the operation of thecompute nodes 112 in compute core 101. In one embodiment, service node102 is a computer system that includes a processor (or processors) 121,a memory 120, and local storage 125. An attached console 107 (e.g., akeyboard, mouse, and display) may be used to initialize computing jobson compute core 101. Service node 102 may also include an internaldatabase which maintains state information for the compute nodes in core101, and an application 124??? which may be configured to, among otherthings, control the allocation of hardware in compute core 101 todifferent computing jobs, direct the loading of data on compute nodes111, migrate process running on one of compute nodes 112 to another, andperform diagnostic and maintenance functions.

In one embodiment, service node 102 communicates control and stateinformation with the nodes of compute core 101 over control systemnetwork 106. Network 106 is coupled to a set of hardware controllers108A-C. Each hardware controller communicates with the nodes of arespective Pset 115 over a corresponding local hardware control network114A-C. The hardware controllers 108 and local hardware control networks114 are logically an extension of control system network 106, althoughphysically separate. In one embodiment, control system network 106 mayinclude a JTAG (Joint Test Action Group) network, configured to providea hardware monitoring facility. As is known, JTAG is a standard forproviding external test access to integrated circuits serially, via afour- or five-pin external interface. The JTAG standard has been adoptedas an IEEE standard. Within a Blue Gene system, the JTAG network may beused to send performance counter data to service node 102 in real-time.That is, while an application is running on compute core 101,performance data may be gathered and transmitted to service node 102without affecting the performance of that application.

Illustratively, memory 120 of service node 102 includes an application124, a global resource manager 126, a node availability data structure128, a cleanup procedure 130, and an error log 132. Application 124 maybe configured to communicate with a distributed application running oncompute core 101. For example, consider an in-memory databasedistributed across a pool of compute nodes. In such a case, each nodecould perform an identical operation on a different portion of databasedata, e.g., each node could store distinct portion of rows of a databasetable. And Application 124 may be used to submit a query to the computenodes 112 in the pool, and in response, each compute node 112 returnsany data records responsive to the query.

In some cases, an application running on one of the compute nodes 112could develop a resource leak as a result of executing the databasequery. Generally, a resource leak occurs when a job completes (orterminates) running on one of the compute nodes 112 without freeingresources used while performing the job. Similarly, an applicationrunning on a compute node 112 may continue to request or allocateresources without freeing them as appropriate. For example, anapplication could create a new temporary file used to store intermediateresults each time a database query is evaluated. If the applicationfailed to delete the temporary file after completing given databaseoperation, the space available to the compute node would slowly dwindle.Further, once the application terminates, the temporary files couldremain. Of course, the example of a database is just one example of anapplication which may be executed on a massively parallel system.Similarly, parallel applications running on the compute nodes 112frequently communicate with one another using data communicationsnetworks provided by the parallel computing system. For example, onecompute node 112 may create a communications link by establishing asocket connection with another compute node 112. In such a case, thecompute node 112 may acquire exclusive control over a communications ornetwork resource, e.g., one of the point-to-point links between twocompute nodes 112 or may create (or request allocation of) buffersstored in memory or provided by the communication hardware. If any ofthese resources are not properly cleaned-up by the application once anapplication completes executing, a resource leak may occur. In such acase, when a subsequent application running on the compute node 112attempts to access a communications resource, that application may findthe resource unavailable.

In one embodiment, global resource manager 126 may be configured tomonitor the compute nodes 112 for resource leaks. The global resourcemanager 126 could be a process running in the background, also known asa “daemon,” a separate application, or routines provided by theoperating system of service node 102. When global resource manager 126detects a resource leak on one of the compute nodes 112, the globalresource manager 126 may update a node availability data structure 128,preventing new jobs from being assigned to that compute node while theresource leak is present. Global resource manager 126 then invokes cleanup procedure 130 to remove the resource leak. Once removed, the globalresource manager 126 then updates the node availability data structure128 a second time so that the compute node 112 is available to beassigned new jobs. Additionally, the global resource manager 126 mayrecord information about the resource leak and the affected compute nodeto error log 132.

In another embodiment, a compute node 112 may be configured to notifythe global resource manager 126 when the compute node 112 develops aresource leak. In such a case, a local resource monitor executing on thecompute node (e.g., as part of the compute node operating system kernel)may monitor resource availability. In another embodiment, the globalresource manager 126 may actively search for resource leaks on idlecompute nodes 112. The global resource manager 126 may perform thesearch by randomly sampling idle compute nodes 112. Alternatively,global resource manager 126 may poll idle compute nodes 112 in apredetermined order. When sampling idle compute nodes 112, globalresource manager 126 may compare a current resource availability on agiven compute node 112 with a known clean point stored on the computenode 112. Generally, a “clean point” refers to a set of resources andresource levels that should be available on a compute node 112, when nojobs are being executed on that compute node 112. If the global resourcemanager 126 determines that a substantial percentage of resources areunavailable, then a resource leak may exist. The exact percentage may betailored to suit the needs of a particular case. For example, the globalresource manager 126 may allow for some variance between the currentresource availability and the known clean state or no variance at all.If the global resource manager 126 determines that a resource leak ispresent on the compute node 112, the global resource manager 126 mayalso determine whether a resource leak has occurred on other computenodes 112 that have recently run the same job as the affected computenode 112. Once a resource leak has been discovered, the global resourcemanager 126 initiates the process described above.

Node availability data 128 identifies compute nodes 112 that arecurrently available to perform jobs. A compute node 112 may be listed asunavailable when a resource leak is identified. Error log 132 containsinformation about resource leaks and the affected compute nodes. Suchinformation may include a reference to the affected compute node, thelast job run on that compute node, the method used to correct theresource link, and other information.

Clean up procedure 130 may be configured to remove (or otherwisecorrect) the resource leak from the compute node 112. In one embodiment,clean up procedure 130 removes the resource leak by rebooting thecompute node 112. In another embodiment, clean up procedure 130 returnsthe compute node 112 to a known good state derived from a stored imageof a clean node-state to remove the resource leak. Of course, othercorrective actions are contemplated.

In addition to service node 102, front-end nodes 103 provide computersystems used to perform auxiliary functions which, for efficiency orotherwise, are best performed outside compute core 101. Functions whichinvolve substantial I/O operations are generally performed in thefront-end nodes 103. For example, interactive data input, applicationcode editing, or other user interface functions are generally handled byfront-end nodes 103, as is application code compilation. Front-end nodes103 are also connected to functional network 105 and may communicatewith file servers 104.

As stated, in a massively parallel computer system 100, compute nodes112 may be logically arranged in a three-dimensional torus, where eachcompute node 112 may be identified using an x, y and z coordinate. FIG.2 is a conceptual illustration of a three-dimensional torus network ofsystem 100, according to one embodiment of the invention. Morespecifically, FIG. 2 illustrates a 4×4×4 torus 201 of compute nodes, inwhich the interior nodes are omitted for clarity. Although FIG. 2 showsa 4×4×4 torus having 64 nodes, it is understood that the actual numberof compute nodes in a parallel computing system is typically muchlarger. For example, a complete Blue Gene/L system includes 65,536compute nodes. Each compute node 112 in torus 201 includes a set of sixnode-to-node communication links 202A-F which allows each compute nodesin torus 201 to communicate with its six immediate neighbors, two nodesin each of the x, y and z coordinate dimensions.

As used herein, the term “torus” includes any regular pattern of nodesand inter-nodal data communications paths in more than one dimension,such that each node has a defined set of neighbors, and for any givennode, it is possible to determine the set of neighbors of that node. A“neighbor” of a given node is any node which is linked to the given nodeby a direct inter-nodal data communications path. That is, a path whichdoes not have to traverse another node. The compute nodes may be linkedin a three-dimensional torus 201, as shown in FIG. 2, but may also beconfigured to have more or fewer dimensions. Also, it is not necessarilythe case that a given node's neighbors are the physically closest nodesto the given node, although it is generally desirable to arrange thenodes in such a manner, insofar as possible.

In one embodiment, the compute nodes in any one of the x, y, or zdimensions form a torus in that dimension because the point-to-pointcommunication links logically wrap around. For example, this isrepresented in FIG. 2 by links 202D, 202E, and 202F which wrap aroundfrom compute node 203 to other end of compute core 201 in each of the x,y and z dimensions. Thus, although node 203 appears to be at a “corner”of the torus, node-to-node links 202A-F link node 203 to nodes 204, 205,and 206, in the x, y, and Z dimensions of torus 201.

FIG. 3 is a high-level diagram of a compute node 112 of the system 100of FIG. 1, according to one embodiment of the invention. As shown,compute node 112 includes processor cores 301 A and 301 B, each havingan instruction address register 306A and 306B. Compute node 112 alsoincludes memory 302 used by both processor cores 301; an externalcontrol interface 303 which is coupled to local hardware control network114 (e.g., control system network 106); an external data communicationsinterface 304 which is coupled to the corresponding local I/O treenetwork 113 (e.g., functional network 105) and the corresponding sixnode-to-node links 202 of the torus network 201; and includes monitoringand control logic 305 which receives and responds to control commandsreceived through external control interface 303. Monitoring and controllogic 305 may access processor cores 301 and locations in memory 302 onbehalf of service node 102 to read (or in some cases alter) theoperational state of node 112. In one embodiment, each compute node 112may be physically implemented as a single integrated circuit.

As described, functional network 105 may service many I/O nodes 113, andeach I/O node 113 is shared by a group of compute nodes 112 (i.e., aPset). Thus, it is apparent that the I/O resources of parallel system100 are relatively sparse when compared to computing resources. Althoughit is a general purpose computing machine, parallel system 100 isdesigned for maximum efficiency in applications which arecomputationally intense.

As shown in FIG. 3, memory 302 stores an operating system image 311, anapplication 312, user application data 313, system resource statistics315, and resource monitor 316. Illustratively, memory 302 also includesa file cache 314, i.e., a cache of data read from or to be written to anI/O file. Operating system image 311 provides a copy of asimplified-function operating system running on compute node 112,referred to as a compute node kernel. Operating system image 311 mayinclude a minimal set of functions required to support operation of thecompute node 112, including functions used to implement the presentinvention.

Application 312 represents a program being executed by the compute node112. The application 312 may be a fragment of a larger application or acomplete application unto itself. Frequently, a copy of application 312may be executed in parallel on thousands of compute nodes 112. In such acase, each copy of application 312 may perform the same computing taskson different sets of data.

As part of ongoing operations, application 312 may be configured totransmit messages from compute node 112 to other compute nodes inparallel system 100. For example, the MPI call of MPI_Send( ) may beused by application 312 to transmit a message from one compute node toanother. On the other side of the communication, the receiving computenode may use the MPI call MPI_Receive( ) to receive the message. Forexample, in context of the present invention, one compute node may useMPI messages to send a request to another a compute for a needed programfragment. As described above, in a Blue Gene system, the external datainterface 304 transmits the MPI message by encapsulating it within a setof packets and transmitting the packets of over the torus network ofpoint-to-point links. Other parallel systems and other parallelcomputing libraries use similar mechanisms for transmitting messagesbetween different compute nodes.

The system resource statistics 315 store information about a known cleanstate of the compute node 112. Although shown as being stored in thememory 315 of compute node 112, the system resource statistics 315 couldalso be collected from multiple compute nodes 112 and transmitted on theservice node 102. In such a case, the service node 102 couldperiodically compare the system resource statistics 315 for a given nodeto an excepted clean state. Examples of system resource statistics 315include information such as available memory, a number of runningprocesses, and available disk space, number of open (or temporary)files, and the like. In one embodiment, the information stored in systemresource statistics 315 is determined from the compute nodes 112 afterbooting, but prior to performing any computing jobs.

The resource monitor 316 may be a daemon or routines included inoperating system image 311. In one embodiment, the resource monitor 316collects an initial set of data reflecting the resources available onthe compute node 112 as part of an initial program load (i.e., as partof the boot process). After the compute node 112 completes a job (orjobs) and performs any clean-up (e.g. freeing allocated memory, deletingany temporary files, tearing down or releasing any network communicationlinks etc.), the resource monitor 316 may compare the resources thencurrently available with the system resource statistics 315. If resourcemonitor 316 determines that a resource leak is present on the computenode 112, the resource monitor 316 may be configured to invoke acorrective action to remove (or correct) the resource leak. For example,resource monitor 316 may notify the global resource monitor 126 toinvoke clean up procedure 130. Alternatively, the compute node 112 maybe configured to be “self-correcting.” For example, the resource monitor316 may be configured to identify and remove any orphaned files ortemporary files created by a process, release communication links, emptynetwork communication buffers or tear down a communication linkestablished while the application was executing the job. Alternatively,the compute node 112 may simply shutdown and reboot after sending logdata to service node 102. Once the resource leak is corrected, theresource monitor 316 may repeat the process as additional jobs aresubmitted.

FIG. 4 illustrates an example of a compute node recovering from aresource leak, according to one embodiment of the invention. FIG. 4shows a simple multi-node system that includes a service node 402, anI/O node 406, disk 408, and eight compute nodes 410 ₁-410 ₈. Inaddition, the service node 402 includes a global resource manager 404and each compute node (as illustrated by compute node 410 ₁) includes aCPU 412 and a memory 414. Memory 414 stores a virtual filesystem 416, anoperating system image 418, and a resource monitor 426. Illustratively,the virtual file system 416 includes two orphaned temporary files 422and 424. As is known, a virtual file system may provide a storagecontainer that functions like a physical storage device (e.g., adisk-drive) constructed from computer memory.

As shown, a resource leak exists on compute node 410 ₁. In thisinstance, orphaned temporary files 422 and 424 represent the resourceleak. In one embodiment, the resource monitor 426 on compute node 410 ₁identifies the resource leak and contacts the global resource manager404 on service node 402 to remove the resource leak. Once contacted, theglobal resource manager 404 performs a corrective action to restorecompute node 410 ₁ to a “clean” state. In one embodiment, the globalresource manager 404 also removes compute node 410 ₁ from a pool ofavailable nodes and perform a corrective action to remove orphanedtemporary file 422 and 424. Once the node 410 ₁ is restored to a cleanstate, the global resource manager 404 returns node 410 ₁ to the pool ofavailable nodes.

In another embodiment, global resource manager 404 contacts compute node410 ₁ to determine whether a resource leak has occurred. For example,the global resource manager 404 may obtain resource availability datadescribing both a clean state and a current state of compute node 410 ₁.After determining that the compute node 410 ₁ has a resource leak (inthis case caused by the orphaned temporary file 422 and the orphanedtemporary file 424), the global resource manager 404 removes computenode 410 ₁ from a pool of available nodes. Further, in one embodiment,the global resource manager 404 may also determine whether other computenodes have performed the same job as compute node 410 ₁ If so, theglobal resource manager may determine whether a resource leak hasoccurred on nodes which have performed the same computing job. That is,once the global resource manager determines that an application runningon one compute node is prone to resource leaks, then the global resourcemanger 404 may monitor each node that executes that particularapplication. When active resource leaks are identified, the globalresource manager 404 performs a corrective action to restore nodes inthe pool to a “clean” state once a leak has been identified. Forexample, the resource manager may identify that orphaned temporary files422 and 424 are not associated with any running process and should bedeleted. Once a compute node is restored to a clean state, the globalresource manager 404 returns that nodes to the pool of available nodes.

FIG. 5 is a flow diagram illustrating a method 500 for recovering from aresource leak on a compute node of a multi-node computer system,according to one embodiment of the invention. As shown, the method 500begins at step 502 where a resource monitor records information aboutwhat system resources are available on the compute node. The systemresource information could be recorded at boot-time or other cleanpoint. Using the scenario described above as an example, the resourcemonitor could record the number of current processes running, the sizeof the virtual filesystem, the amount of available memory, etc. At step504, the compute node performs one or more computing jobs. Afterfinishing the jobs, the resource monitor may again poll the compute nodeto determine what system resources are available (step 506). Forexample, FIG. 4 illustrates a scenario were a running process has lefttwo orphaned temporarily files 422 and 424 on a virtual file system 416.At step 508, the resource manager compares a system resourcerepresenting a clean state to the actual system state determined afterthe computing jobs have completed for indications of a resource leak. Asstated, the resource monitor may allow for some variance between theavailable system resources and the “clean” state before determining thata resource leak has occurred. If the comparison does not indicate thepresence of a resource leak at step 510, the method returns to step 504,where the compute node remains idle until receiving additional computingjobs to perform. Similarly, once performed, the resource monitor mayagain determine whether a resource leak has occurred.

If a resource leak is found at step 510, the resource monitor notifies aglobal resource manager (step 512). In the scenario shown in FIG. 4, thepresence of the orphaned temporary files 422 and 424 may result in aresource leak being identified. For example, if the size of the files422 and 424 result in the amount of available memory to fall below aminimum value specified for a “clean” state, the resource monitor mayconclude that a resource lack has occurred. Again, the minimum value mayreflect an expected variance in available memory due to ongoingoperating system processes, including the operation of the resourcemonitor itself. At step 514, the global resource manager may remove thecompute node from a pool of available nodes and record informationregarding the resource leak. The information could include a referenceto the affected compute node, the difference in resource availability,and the most recently processed job (or jobs). At step 516, the globalresource manager invokes a corrective procedure to remove the resourceleak. At step 518, the global resource manager returns the compute nodeto the pool of available nodes, and returns to step 502 and repeats theprocess.

FIG. 6 is a flow diagram illustrating a method 600 for recovering fromresource leaks on compute nodes of a multi-node computer system,according to one embodiment of the invention. As shown, the method 600begins at step 602 where a global resource manager identifies an idlenode to evaluate for a resource leak. Again referring to the example ofFIG. 4, the global resource manager may select compute node 410 ₁ tocheck for a resource leak (assuming this node is, in fact, idle). Atstep 604, the global resource manager may compare the current resourceavailability on the selected node with a known clean state for thatnode. At step 606, the global resource manager determines whether therea resource leak has occurred, based on the comparison. For example, thismay include considering information about the two orphaned temporarilyfiles. If no resource leak is present, the method 600 returns to step602 and repeats the process with another idle node.

If a resource leak is found (step 606), the global resource managerremoves the compute node from a pool of available nodes and recordsinformation regarding the resource leak (step 608). The informationcould include, e.g., a reference to the compute node, the difference inresource availability, and recently processed job (or jobs). Optionally,the global resource manager may determine whether other compute nodeshave run the same job as a node identified has having a resource leak.If other compute node have run the same job, the resource manager maymark those compute node as needing to be evaluated to determine whethera resource leak has occurred on those nodes as well. Further, theresource manger may mark any such nodes as being unavailable to performcomputing jobs (step 610). That is, the nodes may be removed from a poolof available nodes pending an evaluation for resource leaks. At step614, the global resource manager may invoke a corrective procedure toremove the resource leak on the affected compute node. Finally, at step616, the global resource manager returns the compute nodes to the poolof available nodes. The method 600 then returns to step 602, where theglobal resource manager may evaluate another idle node.

Advantageously, embodiments of the invention allow compute nodes in aparallel computing system to recover from resource leaks with minimaldisruption to ongoing processing tasks. As described herein, a resourcemonitor may record information describing a clean state at system (ornode) boot time. After the compute node performs a job, the resourcemonitor may compare a current state of resource availability on thecompute node with the known clean state. If a resource leak is detected,the resource monitor may contact a global resource manger to remove (orcorrect) the resource leak. The global resource manager can remove theresource leak in several ways, including: rebooting the node, restoringa stored image of clean node state, or other methods. Once the resourceleak is removed, the process begins again. In one embodiment, the globalresource manager may sample idle compute nodes to identify resourceleaks. In such a case, the global resource manager may remove theresource leak as previous described as well as identify other nodes thathave recently run the same job as the affected node. Such nodes may thenbe evaluated for resource leaks as well.

While the foregoing is directed to embodiments of the present invention,other and further embodiments of the invention may be devised withoutdeparting from the basic scope thereof, and the scope thereof isdetermined by the claims that follow.

1. A method for correcting resource leaks that occur on a parallelcomputing system having a plurality of compute nodes, comprising:determining a first resource availability level of a first compute node,of the plurality of compute nodes, in a clean state characterized by anabsence resource leaks on the first compute node; executing one or morecomputing tasks on the first compute node; determining a second resourceavailability level of the first compute node; comparing the firstresource availability level to the second resource availability level todetermine whether a resource leak has occurred on the first computenode; upon determining that a resource leak has occurred: removing thefirst compute node from a pool of compute nodes available to performcomputing tasks, and invoking a corrective action to restore theresource availability level of the first compute node to the cleanstate; and after the clean state is restored on the first compute node,returning the first compute node to the pool of available compute nodes.2. The method of claim 1, wherein the resource leak includes one or morenetwork communications resources allocated to the computing tasksexecuted on the first compute node.
 3. The method of claim 1, whereininvoking a corrective action to restore the resource availability levelof the compute node to the clean state comprises, notifying a servicenode that the resource leak has occurred, wherein the service node isconfigured to perform the corrective action.
 4. The method of claim 1,wherein the corrective action includes rebooting the compute node. 5.The method of claim 1, wherein the corrective action includes loading asystem image of the first compute node captured in the clean state. 6.The method of claim 1, wherein the resource leak includes one or moreorphaned temporary files.
 7. The method of claim 1, wherein the resourceleak comprises a decrease in memory available on the first compute nodethat exceeds a predetermined threshold.
 8. A computer-readable storagemedium containing a program which, when executed, performs an operationfor correcting resource leaks that occur on a parallel computing systemhaving a plurality of compute nodes, the operation comprising:determining a first resource availability level of a first compute node,of the plurality of compute nodes, in a clean state characterized by anabsence resource leaks on the first compute node; executing one or morecomputing tasks on the first compute node; determining a second resourceavailability level of the first compute node; comparing the firstresource availability level to the second resource availability level todetermine whether a resource leak has occurred on the first computenode; upon determining that a resource leak has occurred: removing thefirst compute node from a pool of compute nodes available to performcomputing tasks, and invoking a corrective action to restore theresource availability level of the first compute node to the cleanstate; and after the clean state is restored on the first compute node,returning the first compute node to the pool of available compute nodes.9. The computer-readable storage medium of claim 8, wherein the resourceleak includes one or more network communications resources allocated tothe computing tasks executed on the first compute node.
 10. Thecomputer-readable storage medium of claim 8, wherein invoking acorrective action to restore the resource availability level of thecompute node to the clean state comprises, notifying a service node thatthe resource leak has occurred, wherein the service node is configuredto perform the corrective action.
 11. The computer-readable storagemedium of claim 8, wherein the corrective action includes rebooting thecompute node.
 12. The computer-readable storage medium of claim 8,wherein the corrective action includes loading a system image of thefirst compute node captured in the clean state.
 13. Thecomputer-readable storage medium of claim 8, wherein the resource leakincludes one or more orphaned temporary files.
 14. The computer-readablestorage medium of claim 8, wherein the resource leak comprises adecrease in memory available on the first compute node that exceeds apredetermined threshold.
 15. A parallel computing system, comprising: aplurality of compute nodes, each having at least a processor and amemory; a program, which, when executed on a first compute node, of theplurality, is configured to: determine a first resource availabilitylevel of the first compute node in a clean state characterized by anabsence resource leaks on the first compute node, determine, after atleast a first computing task has been performed on the first computenode, a second resource availability level of the first compute node,compare the first resource availability level to the second resourceavailability level to determine whether a resource leak has occurred onthe first compute node, and upon determining that a resource leak hasoccurred: remove the first compute node from a pool of compute nodesavailable to perform computing tasks, and invoke a corrective action torestore the resource availability level of the first compute node to theclean state; and after the clean state is restored on the first computenode, return the first compute node to the pool of available computenodes.
 16. The system of claim 15, wherein the resource leak includesone or more network communications resources allocated to the computingtasks executed on the first compute node.
 17. The system of claim 15,wherein invoking a corrective action to restore the resourceavailability level of the compute node to the clean state comprises,notifying a service node that the resource leak has occurred, whereinthe service node is configured to perform the corrective action.
 18. Thesystem of claim 15, wherein the corrective action includes rebooting thecompute node.
 19. The system of claim 18, wherein the corrective actionincludes loading a system image of the first compute node captured inthe clean state.
 20. The system of claim 15, wherein the resource leakincludes one or more orphaned temporary files.
 21. The system of claim15, wherein the resource leak comprises a decrease in memory availableon the first compute node that exceeds a predetermined threshold.